import allure
from appium.webdriver.common.appiumby import AppiumBy

from tests.app.pages.manage_enterprise_page import ManageEnterprisePage
from tests.app.pages.wecom import Wecom


class WorkBenchPage(Wecom):
    __MANAGE_ENTERPRISE = AppiumBy.XPATH, '//*[@text = "管理企业"]'

    @allure.step("进入到管理企业页面")
    def goto_manage_enterprise_page(self):
        self.find_and_click(*self.__MANAGE_ENTERPRISE)
        return ManageEnterprisePage(self.driver)
